package com.example.understandvideo.service.transcode;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.*;
import java.util.Collections;
import java.util.List;

@Data// lombok注解，给字段添加getter和setter
@XmlAccessorType(XmlAccessType.FIELD)// 映射所有的字段
@XmlRootElement(name = "stream")// XML根节点名称，此处为user
@AllArgsConstructor
@NoArgsConstructor
@XmlType(propOrder = {"h264", "aac"})
public class CloudStream {
    @XmlAttribute// 解析节点的属性
    private Integer id;
    private CloudStreamH264 h264;
    private CloudStreamAAC aac;
    public static List<CloudStream> getDefault(){
        CloudStream cloudStream = new CloudStream(-1,CloudStreamH264.getDefault()
                ,new CloudStreamAAC("LC","1","2","64000","32000","0","0","-30","0","0","None","-1","","")
        );
        return Collections.singletonList(cloudStream);
    }
}
